package model

import "gorm.io/gorm"

type Login struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(50)"`
}

type User struct {
	gorm.Model
	Rid      int    `gorm:"type:int"`
	Username string `gorm:"type:varchar(50)"`
	Tel      string `gorm:"type:varchar(50)"`
	Name     string `gorm:"type:varchar(50)"`
	Email    string `gorm:"type:varchar(50)"`
}

type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

type Role struct {
	gorm.Model
	RoleName        string `gorm:"type:varchar(50)"`
	RoleInformation string `gorm:"type:varchar(50)"`
}

type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

type Node struct {
	gorm.Model
	Rid      int    `gorm:"type:int"`
	NodeType string `gorm:"type:varchar(50)"`
	NodeName string `gorm:"type:varchar(50)"`
}
type People struct {
	gorm.Model
	PeopleCode string `gorm:"type:varchar(50)"`
	Name       string `gorm:"type:varchar(50)"`
	Address    string `gorm:"type:varchar(50)"`
	Tel        string `gorm:"type:varchar(50)"`
	Status     string `gorm:"type:varchar(50)"`
}

type Order struct {
	gorm.Model
	Pid          int    `gorm:"type:int"`
	OrderCode    string `gorm:"type:varchar(50)"`
	OrderAddress string `gorm:"type:varchar(50)"`
}

type PeopleOrderList struct {
	OrderId      int
	PeopleCode   string
	Name         string
	Address      string
	Tel          string
	Status       string
	OrderCode    string
	OrderAddress string
}
